<?php

/**
* YtTest.php
*
* Test You Tube client
*
* @author     Blazej Zieba <b@zieba.info>
* @copyright  2007 konekto.com
* @version    CVS: $Id:$
*/
require_once '../config.php';
require_once 'simpletest/autorun.php';
require_once 'simpletest/web_tester.php';

require_once '../Yt.class.php';

class YtTest extends WebTestCase
{

    private $yt = null;

    function setUp()
    {
        $this->yt = Yt::getClient();
    }


    public function testYtToken()
    {
        $myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();

        $myVideoEntry->setVideoTitle("Test");
        $myVideoEntry->setVideoDescription("Test");
        $myVideoEntry->setVideoCategory('People');
        $myVideoEntry->SetVideoTags("Test");

        $tokenArray = $this->yt->getFormUploadToken($myVideoEntry);
        $this->assertTrue( count ( $tokenArray )  ); 
    }

    public function tearDown()
    {
        Yt::unSetClient(); 
    }
    
}

?>
